###############################################################################
This file provides a guide to the code and data objects associated with 

Moore, Ryan T., Eleanor Neff Powell, and Andrew Reeves. "Driving Support:
Workers, PACs, and Congressional Support of the Auto Industry". Business and
Politics, 15(2):137-162, 2013.

1 September 2013
###############################################################################

###############################################################################
Notes

1. The user should create a replication directory that includes three components:

  A. this file,
  B. a subdirectory /code/, which includes all .R files to create data and conduct analyses, and
  C. a subdirectory /data/, which includes data objects, and
  D. a subdirectory /figs/tabs/, into which some tabular output is put by default.

2. This collection of files replicates the paper, roughly by following the order of files below.

3. The code assumes that the R working directory is the directory which is one level above /code/ and /data/.  

4. Some tabular output is, by default, put into a directory /figs/tabs/, where /figs/ is at the same level as /code/ and /data/. 
###############################################################################


### Files that prepare data, perform analyses, and create plots: ###

1. drivingReplication.R
-- Loads the primary data, autoFull4.RData
-- autoFull4.RData includes two R objects, 'adat' and 'imp.bills'
-- 'adat' loads as 900x7119; 'imp.bills' loads as 1426x22
-- Sources two functions stored in 'replicationFuncs.R'
-- Performs calculations reported in paper Sections 4, 5, and 6
-- Calculates all predicted probabilities, first differences, and confidence intervals
-- Creates plots and tables in paper Sections 4, 5, and 6
-- Creates plots and tables in Supplementary Materials


2. replicationFuncs.R
-- Defines two helper functions, regressBillsAFL() and cut.func()
-- The default directory into which regressBillsAFL() will put tabular output is /figs/tabs/

3. IndustrySponsor.R
-- Performs calculations reported around page 157

4. regressAll.R
-- Performs regressions with all possible specifications

5. regressAllExtract.R
-- Extracts coefficients from all possible specifications

6. regressAllExtractPlot.R
-- Plot extracted coefficients from all possible specifications


### Data Objects ###

1. autoFull4.RData
-- Primary data file

2. sponsor.txt
-- Data for calculations reported around page 157

3. positionsbills.csv
-- Data for paper Section 6.1 estimations, reported in Supplementary Tables S1-S8
